//
// Created by zx208 on 2024/10/26.
//

// 设计一个算法用于判断带头结点的循环双链表是否对称

#include "../DoubleLinkedList.h"

DouLinkList Init_DL(DouLinkList L){
    DouLinkList head = (DouLinkList) malloc(sizeof( DNode));
    head->next = head;
    head->prior = head;
    return head;
}

void Insert_DL(DouLinkList L, ElemType e){
    DouLinkList p = (DouLinkList) malloc(sizeof( DNode));
    p->data = e;

    // 此部分需要再理解
    p->next = L->next;
    p->prior = L;
    L->next = p;
    p->next->prior = p;
}

// TODO
Status Is_Symmetrical(DouLinkList L){

    return OK;
}

int main(void){
    DouLinkList L = NULL;
    L = Init_DL(L);
    Insert_DL(L, 1);
    Insert_DL(L, 2);
    Insert_DL(L, 3);
    Insert_DL(L, 4);
    return 0;
}